package Leetcode第一期;

/**
 * @author : K k
 * @date : 13:36 2020/8/27
 */
public class 反转链表_206 {
    public ListNode reverseList(ListNode head) {
        ListNode prev=null;
        ListNode curr=head;
        while (curr!=null){
            ListNode nextTemp=curr.next;
            curr.next=prev;
            prev=curr;
            curr=nextTemp;
        }
        return prev;
    }
}

